﻿@model PortraitModel
@{
    ViewBag.Title = "头像编辑";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<section class="pe-basic">
    @Html.Partial("_PersonalPartial")

    <div class="content">
        <h4>头像编辑</h4>
        @using (Html.BeginForm("UploadPortrait", "Personal", FormMethod.Post, new { enctype = "multipart/form-data" }))
        {
            @Html.AntiForgeryToken()

            if (Model.Portrait.IsNotEmpty())
            {
            <div class="field">
                <div class="editor-field">
                    <img alt="" src="/Assets/Member/@(Model.Id)/@(Model.Portrait)-large.jpg" />
                    <img alt="" src="/Assets/Member/@(Model.Id)/@(Model.Portrait)-micro.jpg" />
                </div>
            </div>
            }
            <div class="field">
                <div class="editor-label">
                    @Html.LabelFor(model => model.Portrait)
                </div>
                <div class="editor-field">
                    @this.FileUpload("Portrait")
                </div>
            </div>
            <div class="field">
                <div class="editor-label">
                </div>
                <div class="editor-field">
                    <input type="submit" value="编辑头像" />@Html.ActionLink("继续下一步", "Portrait")
                </div>
            </div>
        }
    </div>
</section>
